package com.neusoft.data.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.neusoft.data.mapper.SerForecastMapper;
import com.neusoft.data.domain.SerForecast;
import com.neusoft.data.service.ISerForecastService;

/**
 * 成绩预测Service业务层处理
 * 
 * @author slh
 * @date 2024-01-04
 */
@Service
public class SerForecastServiceImpl implements ISerForecastService 
{
    @Autowired
    private SerForecastMapper serForecastMapper;

    /**
     * 查询成绩预测
     * 
     * @param forecastId 成绩预测主键
     * @return 成绩预测
     */
    @Override
    public SerForecast selectSerForecastByForecastId(Long forecastId)
    {
        return serForecastMapper.selectSerForecastByForecastId(forecastId);
    }

    /**
     * 查询成绩预测列表
     * 
     * @param serForecast 成绩预测
     * @return 成绩预测
     */
    @Override
    public List<SerForecast> selectSerForecastList(SerForecast serForecast)
    {
        return serForecastMapper.selectSerForecastList(serForecast);
    }

    /**
     * 新增成绩预测
     * 
     * @param serForecast 成绩预测
     * @return 结果
     */
    @Override
    public int insertSerForecast(SerForecast serForecast)
    {
        serForecast.setCreateTime(DateUtils.getNowDate());
        return serForecastMapper.insertSerForecast(serForecast);
    }

    /**
     * 修改成绩预测
     * 
     * @param serForecast 成绩预测
     * @return 结果
     */
    @Override
    public int updateSerForecast(SerForecast serForecast)
    {
        serForecast.setUpdateTime(DateUtils.getNowDate());
        return serForecastMapper.updateSerForecast(serForecast);
    }

    /**
     * 批量删除成绩预测
     * 
     * @param forecastIds 需要删除的成绩预测主键
     * @return 结果
     */
    @Override
    public int deleteSerForecastByForecastIds(Long[] forecastIds)
    {
        return serForecastMapper.deleteSerForecastByForecastIds(forecastIds);
    }

    /**
     * 删除成绩预测信息
     * 
     * @param forecastId 成绩预测主键
     * @return 结果
     */
    @Override
    public int deleteSerForecastByForecastId(Long forecastId)
    {
        return serForecastMapper.deleteSerForecastByForecastId(forecastId);
    }
}
